<!DOCTYPE html>
<html>

<head>

	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">


	<title>{$title}</title>
	<meta name="keywords" content="我的店铺">
	<meta name="description" content="我的店铺">

	<link href="/Partner/static/css/bootstrap.min.css?v=3.3.5" rel="stylesheet">
	<link href="/Partner/static/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
	<link href="/Partner/static/css/plugins/iCheck/custom.css" rel="stylesheet">
	<link href="/Partner/static/css/animate.min.css" rel="stylesheet">
	<link href="/Partner/static/css/style.min.css?v=4.0.0" rel="stylesheet">
	<base target="_self">

</head>

<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">


	<div class="page-content" style="padding: 0;border: none;">

	<style type="text/css">
	.modal {
		height: 600px;
	}
	
	.modal-infp-style {
		width: 90%;
		margin: 10px auto;
	}
	
	.modal-infp-style table {
		width: 100%;
	}
	
	.modal-infp-style table tr td {
		border: 1px solid #e6e6e6;
		padding: 8px;
	}
	
	a:hover {
		cursor: pointer;
	}
</style>
		<link rel="stylesheet" type="text/css" href="/Store/css/WdatePicker/skin/WdatePicker.css" />
		<script src="/Store/css/WdatePicker/WdatePicker.js" type="text/javascript" charset="utf-8"></script>
<div class="main-content">

	<section class="scrollable wrapper">
		<div class="row panel-body" style="padding-top:0px;">
			<a href="{:U('users/users_list')}" class="btn btn-sm btn-default">返回</a>
		</div>
		<div class="row panel-body" style="padding-top:0px;">

			<a href="{:U('users/xiaofeidetail',array('id'=>$_GET['id'],'type'=>0))}"  class="btn btn-sm <eq name='order_type' value='0'>btn-default</eq><neq name='order_type' value='0'>btn-success</neq>">全部</a>
			<a href="{:U('users/xiaofeidetail',array('id'=>$_GET['id'],'type'=>4))}"  class="btn btn-sm <eq name='order_type' value='4'>btn-default</eq><neq name='order_type' value='4'>btn-warning</neq>">已取消</a>
			<a href="{:U('users/xiaofeidetail',array('id'=>$_GET['id'],'type'=>1))}"  class="btn btn-sm <eq name='order_type' value='1'>btn-default</eq><neq name='order_type' value='1'>btn-danger</neq>">未完成</a>
			<a href="{:U('users/xiaofeidetail',array('id'=>$_GET['id'],'type'=>2))}"  class="btn btn-sm <eq name='order_type' value='2'>btn-default</eq><neq name='order_type' value='2'>btn-info</neq>">已完成</a>
			<a href="{:U('users/xiaofeidetail',array('id'=>$_GET['id'],'type'=>3))}"  class="btn btn-sm <eq name='order_type' value='3'>btn-default</eq><neq name='order_type' value='3'>btn-primary</neq>">退换货</a>
			<form action="{:U('users/xiaofeidetail',array('id'=>$_GET['id'],'type'=>0))}" method="get" style="float: right;">
				<input type="text" name="startDate" placeholder="请选择开始日期"  value="{$_GET['startDate']}" class="input-medium" style="float:left;width:203px;margin-right:5px;padding:5px 10px;height:30px;border:1px solid #d9d9d9;" onclick="WdatePicker()">
				<input type="text" name="endDate" placeholder="请选择结束日期" value="{$_GET['endDate']}" class="input-medium" style="float:left;width:203px;margin-right:5px;padding:5px 10px;height:30px;border:1px solid #d9d9d9;" onclick="WdatePicker()">
				<button class="btn btn-sm btn-default" type="submit" >搜索</button>
			</form>
		</div>
		<section class="panel panel-default">
			<div class="table-responsive">
				<table class="table table-striped b-t b-light text-sm">
					<thead>
						<tr>

							<th>订单编号</th>
							<th class="center">店铺</th>
							<th class="center">下单时间</th>
							<th class="center">订单总额</th>
							<th class="center">订单状态</th>
							<th class="center">操作</th>
						</tr>
					</thead>
					<tbody id="list">
						
						<foreach name="order_list" item="v">
						<tr>
							<td>{$v.order_sn}<eq name="v.order_type" value="1">【赠品订单】</eq></td>
							<td>{$v.store_name}</td>
							<td>{:date('Y-m-d H:i:s',$v['add_time'])}</td>
							<td>￥ {$v.order_amount}</td>
							<php>
								if($v['tuanselect']==1){
								if($v['tuan_is_first_id']==0){
								$num=get_tuan($v['order_id']);
								}else{
								$num=get_tuan($v['tuan_is_first_id']);
								}

								}
							</php>
							<td>
								<eq name="v['refund_state']" value="0">
									<eq name="v['order_state']" value="0">
										已取消
									</eq>
									<eq name="v['order_state']" value="10">
										等待买家付款
									</eq>
									<eq name="v['order_state']" value="20">
										<php>if($v['tuanselect']==1&&$num<$v['tuannum']){</php>
										拼团中
										<php>}elseif($v['tuanselect']==1&&$num==$v['tuannum']){</php>
										拼团成功<br/>等待卖家发货
										<php>}else{</php>
										等待卖家发货
										<php>}</php>

									</eq>
									<eq name="v['order_state']" value="30">
										等待买家收货
									</eq>
									<eq name="v['order_state']" value="40">
										待评价
									</eq>
								</eq>
								<gt name="v['refund_state']" value="0">
									<eq name="v['refund_state']" value="1">
										退款,待审核
									</eq>
									<eq name="v['refund_state']" value="2">
										已同意
										<notempty name="v['refund_shipping_code']">
											<br>买家已发货
										</notempty>

									</eq>
									<eq name="v['refund_state']" value="3">
										已拒绝退款
									</eq>
									<eq name="v['refund_state']" value="4">
										等待客服打款
									</eq>
									<eq name="v['refund_state']" value="5">
										退换货完成
									</eq>

									<eq name="v['refund_type']" value="1">(我要退款，但不退货)</eq>
									<eq name="v['refund_type']" value="2">(我要退款，退货)</eq>
								</gt>
							</td>
							<td>
								<a href="{:U('users/orderdetail',array('id'=>$v['order_id']))}">查看</a>
							</td>
						</tr>
						</foreach>
				</table>
			</div>
			<style type="text/css">
				.pagination{}
				.pagination a{display: block;float: left;border-bottom-left-radius: 3px;border-top-left-radius: 3px;padding: 5px 10px;font-size: 12px;font-weight: 500;border-radius: 2px;}
				.pagination span{display: block;float: left;border-bottom-left-radius: 3px;border-top-left-radius: 3px;background-color: #fafafa;border: 1px solid #dddddd;padding: 5px 10px;font-size: 12px;font-weight: 500;border-radius: 2px;}
			</style>
			<footer class="panel-footer">
				<div class="row" id="page">
					
					<div class="col-sm-4 text-center">
						<small class="text-muted inline m-tb-8">总计 <span id="total_count_num">{$count}</span>个记录</small>
						<small class="text-muted inline m-tb-8">
							有效订单总额 ￥{$count_price}  &nbsp;&nbsp; <em style="color:red;font-style: normal">注：(有效订单指已付款未退换货订单)</em>
						</small>
					</div>
					<div class="col-sm-5 text-right text-center-xs">
						<ul class="pagination pagination-sm m-t-none m-b-none">
							{$page}
						</ul>
					</div>
					
				</div>
			</footer>

		</section>

	</section>
</div>
	</div>
</div>